<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="dictCategoryList" checkbox="true" fitColumns="true" title="重修申请审核" actionUrl="reStudyApplyController.do?auditDatagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="状态值"  field="applyState_value"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="申请人学号"  field="applyUser.userName"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="申请人姓名"  field="applyUser.realName"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="申请日期"  field="createDate" formatter="yyyy-MM-dd" hidden="false"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="重修课程"  field="lessonInfo.lessonName"   query="false" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="备注"  field="remark"   query="false" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="状态"  field="applyState_name"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgFunOpt  funname="auditOK1(id)" title="审核通过"  exp="applyState_value#eq#1"/>
   <t:dgFunOpt  funname="auditFail1(id)" title="驳回申请" exp="applyState_value#eq#1"/>
   <t:dgFunOpt  funname="auditOK2(id)" title="审核通过"   exp="applyState_value#eq#2"/>
   <t:dgFunOpt  funname="auditFail2(id)" title="驳回申请"   exp="applyState_value#eq#2"/>
   </t:datagrid>
  </div>
 </div>
 <script type="text/javascript">
 
 function auditOK1(id){
	 var url = "reStudyApplyController.do?goAuditOK1&id="+id;
	 createwindow("审核通过", url,500,260);
 }
 
 function auditFail1(id){
	 var url = "reStudyApplyController.do?goAuditFail1&id="+id;
	 createwindow("驳回申请", url,500,260);
 } 
 
 
 function auditOK2(id){
	 var url = "reStudyApplyController.do?doAuditOK2=";
	 $.dialog.setting.zIndex = getzIndex(true);
 	 $.dialog.confirm('确定要审核通过吗?', function(r) {
 		if (r) {
 			$.ajax({
 				url:url,
 				type:"POST",
 				data:{id:id},
 				success:function(d){
 					d = $.parseJSON(d);
 					tip(d.msg);
 					if(d.success){
 						reloadTable();
 					}
 				}
 			});
 		}
 	 });
 }
 
 function auditFail2(id){
	 var url = "reStudyApplyController.do?goAuditFail2&id="+id;
	 createwindow("驳回申请", url,500,260);
 }
 
 </script>